package com.smartticket.jeju.repository;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Component;

import com.smartticket.jeju.model.User;

@Component
@Qualifier("userRowMapper")
public class UserRowMapper implements RowMapper<User> 
{
	public User mapRow(final ResultSet rs, final int rowNum) throws SQLException 
	{
		return new User(
				rs.getString("id"),
				rs.getString("name"),
				rs.getString("pw"),
				rs.getString("phone"),
				rs.getString("email"),
				rs.getString("region"),
				rs.getInt("deposit")
				);
	}
}